(echo -e "set terminal png medium\nset xlabel \"Request for Spatial Data per second\"\nset ylabel \"Average Response Time (ms)\"\nset title \"Response time with increasing request\"\nplot \"-\" using 1:2 with lines notitle" ; awk 'BEGIN{FS="\t";} NR%10==0 {if(!t){t=$1} mins=$1; printf("%d %f\n",mins,$2)}' bench.txt ; echo -e "end" ) | gnuplot > bench.png


ERLPID=`pgrep -f 'beam'`; while [ 1 ] ; do MEM=`ps -o rss= -p $ERLPID`; echo -e "`date`\t`date +%s`\t$MEM\t"; sleep 60; done | tee -a spec_mem.log

EXTPRGPID=`pgrep -f 'extprg'`; while [ 1 ] ; do MEM=`ps -o rss= -p $EXTPRGPID`; echo -e "`date`\t`date +%s`\t$MEM\t"; sleep 60; done | tee -a extprg_mem.log
